﻿/*******************************************************
* Copyright (c) 2018-2088, By XuXiang all rights reserved.
*
* FileName: ServerGame.h
* Summary: 游戏服务模块。
*
* Author: XuXiang
* Date: 2024-04-10 15:01
*******************************************************/

#ifndef __ServerGame_h__
#define __ServerGame_h__

#include <vector>
#include <map>
#include <Frame/ServerBase.h>
using namespace std;

namespace Competition
{
	class LoginModule;
	struct NetDataItem;

	class ServerGame : public ServerBase
	{
	public:
		ServerGame();
		virtual ~ServerGame();

	protected:

		//初始化
		virtual void OnInit();

		//释放
		virtual void OnRelease();

		//收到命令
		virtual void OnCommand(const std::string& cmd, const std::vector<std::string> &param);

		//初始化模块
		virtual void OnInitModules();

		//发生连接
		virtual void OnConnect(UInt64 uid);

		//断开连接
		virtual void OnDisconnect(UInt64 uid);

		//登陆模块
		LoginModule *m_LoginModule;
	};
}

#endif